//
//  LBSlidePopDemoController.m
//  TEXT
//
//  Created by mac on 2024/8/18.
//  Copyright © 2024 刘博. All rights reserved.
//

#import "LBSlidePopDemoController.h"
#import "LBSlidePopViewController.h"
#import "LBPopupPresentationController.h"

@interface LBSlidePopDemoController ()

@end

@implementation LBSlidePopDemoController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor greenColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(100, 100, 100, 100);
    [button addTarget:self action:@selector(kkk) forControlEvents:UIControlEventTouchUpInside];
    button.backgroundColor = [UIColor cyanColor];
    [self.view addSubview:button];
    // Do any additional setup after loading the view.
}

- (void)kkk
{
//    LBSlidePopViewController *vc = [[LBSlidePopViewController alloc] init];
//    UINavigationController *nv = [[UINavigationController alloc] initWithRootViewController:vc];
//    nv.view.backgroundColor = [UIColor clearColor];
//    LBPopupPresentationController *presentation = [[LBPopupPresentationController alloc] initWithPresentedViewController:nv presentingViewController:self.navigationController];
//    nv.transitioningDelegate = presentation;
//    [self.navigationController presentViewController:nv animated:YES completion:nil];
    LBSlidePopViewController *vc = [[LBSlidePopViewController alloc] init];
    vc.modalPresentationStyle = UIModalPresentationOverCurrentContext;
    [self presentViewController:vc animated:YES completion:nil];
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
